<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    var date = new Date();
    console.log(date,typeof date);
    // console.log(date+111111111);

    // 日期对象转毫秒数
    // (1) 隐式类型转换 =>  date遇到 - * / % 会隐式转化为数字
    var ms = date*1;
    console.log(ms);

    // (2) valueOf()  日期对象拓展方法 
    var ms = date.valueOf();
    console.log(ms);

    // (3) getTime()  日期对象拓展方法 
    var ms = date.getTime();
    console.log(ms);





</script>
</html>